﻿@{Htss.Platform.Web.HtmlHelper Html = new Htss.Platform.Web.HtmlHelper();}
<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <title>搜索-@DreamBox.DAL.SiteConfig.Config.SiteName-@DreamBox.DAL.SiteConfig.Config.Title</title>
    <meta name="description" content="@DreamBox.DAL.SiteConfig.Config.Description" />
    <meta name="keywords" content="@DreamBox.DAL.SiteConfig.Config.KeyWords" />
    <script type="text/javascript" src="/tools/js/jquery-2.1.1.min.js"></script>
    <link href="/style/metro/css/metro-bootstrap.css" rel="stylesheet" />
    <script src="/style/metro/css/metro.min.js"></script>
</head>
<body class="metro">
    <div class="container">
        @Html.Action("", "header")
        <div class="row offset3">
            <form class="" action="/search" target="_self" method="get" style=" margin-top:5px; height:14px;">
                <div class="input-control text size5">
                    <input type="text" name="kw" id="kw" class="" style="width:350px;" />
                    <input type="hidden" value="posts" name="t" id="t" />
                </div>
                <button type="submit" class="button primary">搜 索</button>
            </form>
        </div>
        @if (Html.Request.QueryString["kw"] != null && Html.Request.QueryString["kw"] != "")
        {
            <div class="row offset3 padding5">
                <div class="span12">
                    <div class="listview">
                        @foreach (System.Data.DataRow row in (Html.ViewData["ListData"] as System.Data.DataTable).Rows)
                        {
                            <a href="@(row["Url"])" class="list span8" target="_blank">
                                <div class="list-content">
                                    <img src="@(row["Avatar"])" title="@(row["UserName"])" alt='@(row["UserName"])' class="icon">
                                    <div class="data">
                                        <span class="list-title"><h4>@(row["Title"])</h4></span>
                                        <span class="list-remark">发布人:(@(row["UserName"]))&nbsp;&nbsp;发布时间(@(row["Time"]))</span>
                                    </div>
                                </div>
                            </a>
                        }
                    </div>
                </div>
            </div>
            <div class="row offset3">
                <div class="span12">
                    @Html.ViewData["ListPage"]
                </div>
            </div>
            <script type="text/javascript">
                $("#kw").val('@(Html.Request.QueryString["kw"])');
            </script>
        }
        @Html.Action("", "footer")
    </div>
</body>
</html> 